package com.zff.rental.utils.specification;

import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Path;
import jakarta.persistence.criteria.Predicate;

/**
 * @author HCY
 */
public class LikePre<Root> extends BasePre<Root, String, String> {
    public LikePre(String name, String value) {
        super(name, value);
    }


    @Override
    protected Predicate generate(CriteriaBuilder cb, Path<String> path, String[] params) {
        return cb.like(path, params[0]);
    }
}
